import {createSlice} from '@reduxjs/toolkit'
const loginSlice =createSlice({
    name:'login',
    initialState:{
        phone:'',
        password:''
    },
    reducers:{
        setPassword(state,action){
            state.password=action.payload
        },
        setPhone(state,action){
            state.phone=action.payload
        }

    }
})
export const {setPassword,setPhone} = loginSlice.actions
export const {reducer:loginReducer}=loginSlice